<?php
/**
 * Created by PhpStorm.
 * User: mr.houhai
 * Date: 2018/3/18
 * Time: 14:14
 */

namespace Admin\Controller;

class UserController extends BaseController
{
    public function user_list()
    {
        $key = I('key','');
        $key == '' ? $maps = array() : $maps['nickname'] = array('LIKE',"%$key%");

        $list = M('users')->where($maps)->select();
        $count = M('users')->where($maps)->count();

        $this->assign('list',$list)->assign('count',$count);
        $this->display();
    }
}